home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: artemis.sto.fdata.se!news
- From: Mikael Andersson <dala@ludd.luth.se>
- Subject: File I/O problems in DLL
- Sender: news@artemis.sto.fdata.se (UseNet NetNews)
- Message-ID: <3150365E.2310@ludd.luth.se>
- Date: Wed, 20 Mar 1996 16:46:22 GMT
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=us-ascii
- Mime-Version: 1.0
- X-Mailer: Mozilla 2.01 (Win95; I)
- Organization: WM-data F÷rsvarsdata AB, Sweden
-
- I'm having trouble with file I/O in a DLL I've made with Borland C++
- 4.0x which a FoxPro program is using.
-
- First I made a testprogram in C++ and everything went ok, but the DLL
- just stopped working when called by the FoxPro program. After much
- trouble I heard that you must use SDK file I/O in the DLL, I used
- ifstream and TFile, so I tested with OpenFile and _lread and so on and
- it worked again. So what's this all about? Can't you use TFile and
- ifstream, and if so why?
-
- The problems I had when using ifstream and TFile was that a file FoxPro
- created when opened in the DLL was empty (or the ifstream just couldn't
- get any thing from it). Is it some kind of buffering problem, or
- what? Both TFile and ifstream had problems with closing the files it
- opened/created.
-
- Grateful for all help I can get.
-
- Micke Andersson, dala@ludd.luth.se
-